<?php
Yii::app()->clientScript->registerScriptFile($this->staticsPath."/frontend/js/jquery.js",CClientScript::POS_HEAD);
Yii::app()->clientScript->registerScriptFile($this->staticsPath."/js/bootstrap.min.js",CClientScript::POS_HEAD);
Yii::app()->clientScript->registerCssFile($this->staticsPath."/css/global.css");
Yii::app()->clientScript->registerCssFile($this->staticsPath."/css/index.css");
Yii::app()->clientScript->registerCssFile($this->staticsPath."/css/font-awesome.min.css");
Yii::app()->clientScript->registerCssFile($this->staticsPath."/Font-Awesome-3.2.1/css/font-awesome.min.css");

Yii::app()->clientScript->registerCssFile($this->staticsPath."/css/bootstrap.min.css");
Yii::app()->clientScript->registerScriptFile($this->staticsPath."/start/jquery.raty.js",CClientScript::POS_HEAD);
Yii::app()->clientScript->registerScriptFile($this->staticsPath."/js/Chart.js",CClientScript::POS_HEAD);
Yii::app()->clientScript->registerScriptFile($this->staticsPath."/Flotr2/flotr2.js",CClientScript::POS_HEAD);


Yii::app()->clientScript->registerCss("CSS1","
    .cont_box img{
        height: 200px;
    }

   #loadings {
        left: 50%;
        position: absolute;
        top: 50%;
    }


");


?>
<style type="text/css">
    .breadcrumb {
        font-size: 12px;

    }
    .main-box {

        height: 100%;
        left: 0;
        margin: 0 auto;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: -1;
    }
    .morcon {
        height: 100px;
        margin: 245px 20px 20px;
        position: relative;
        text-align: center;
    }

    .morcon .reg {
        background: rgba(255, 255, 255, 0) none repeat scroll 0 0;
        border: medium none;
        color: #fff;
        font-size: 20px;
        left: 4%;
        position: absolute;
        top: 0;
    }
    .morcon .login {
        background: rgba(255, 255, 255, 0) none repeat scroll 0 0;
        border: medium none;
        color: #fff;
        display: block;
        font-size: 20px;
        left: 51%;
        position: absolute;
        top: 39%;
    }

    .wrap .header{
        width: 100%;
        position: relative;
        height: 300px;
    }
    .wrap .footer {
        height: 300px;
        position: relative;
        width: 100%;
    }

    .wrap .header .mydodo{
        background: url("<?php echo $this->staticsPath."/img/mydodo.png" ?>") no-repeat scroll 0 0 / 150px auto;
        height: 40px;
        width: 150px;
        position: absolute;
        right: 15px;
        top: 25px;
    }
    .wrap .header .imgbg{
        background: url("<?php echo $this->staticsPath."/img/imgbg.png" ?>") no-repeat scroll 0 0 / 150px auto;
        height: 150px;
        width: 150px;
        position: absolute;
        left: 15px;
        top: 90px;
    }
    .imgbg .box{
        width: 100%;
        height: 100%;
        position: relative;
    }
    .imgbg .box img {
        border-radius: 50%;
        height: 80%;
        left: 15px;
        position: absolute;
        top: 15px;
        width: 80%;
    }
    .wrap .header .hname {
        height: 200px;
        left: 170px;
        position: absolute;
        top: 144px;
        width: 200px;
    }
    .wrap .header .hname p{
        color: #0066b3;
        font-size: 20px;
    }
    .wrap .header .list {


        height: 80px;
        left: 25px;
        position: absolute;
        top: 25px;
        width: 80px;
    }
    .wrap .header .list a{
        color: #0066b3;
        font-size: 30px;
    }
    .wrap .footer .fbotton{
        width: 33%;
        height: 150px;
        float: left;
    }
    .wrap .footer .fbotton .like{
        background: url("<?php echo $this->staticsPath."/img/mylike.png" ?>") no-repeat scroll 13px 0 / 90px auto;
        height: 100%;
        width: 100%;
    }
    .wrap .footer .fbotton .collection{
        background: url("<?php echo $this->staticsPath."/img/mycollection.png" ?>") no-repeat scroll 13px 0 / 104px auto;
        height: 100%;
        width: 100%;
    }
    .wrap .footer .fbotton .share{
        background: url("<?php echo $this->staticsPath."/img/share.png" ?>") no-repeat scroll -2px 15px / 114px auto;
        height: 100%;
        width: 100%;
    }
    .wrap .footer .fbotton .point{
        background: url("<?php echo $this->staticsPath."/img/point.png" ?>") no-repeat scroll 6px 0 / 104px auto;
        height: 100%;
        width: 100%;
    }
    .wrap .footer .fbotton .pointlist{
        background: url("<?php echo $this->staticsPath."/img/pointlist.png" ?>") no-repeat scroll 13px 0 / 90px auto;
        height: 100%;
        width: 100%;
    }
    .wrap .footer .fbotton .pointgift{
        background: url("<?php echo $this->staticsPath."/img/pointgift.png" ?>") no-repeat scroll 13px 11px / 90px auto;
        height: 100%;
        width: 100%;
    }
    body{
        background: #f4f4f4 none repeat scroll 0 0;
    }
    .topban{
        padding: 0 10px
    }
    .topban .top {
        color: #888;
        height: 20px;
        left: 50%;
        line-height: 20px;
        margin: -10px 0 52px -30px;
        position: absolute;
        top: 50%;
    }
    .child_zw{
        cursor:pointer;
    }
    .topban .top.name {
        margin-top: -30px;
    }
    .topban .top.num {
        margin-top: -5px;
    }
    .topban .top.subject {
        margin-top: 20px;
    }
    #logout{
        color: #ffffff;
        font-size: 18px;
    }
    #logout:hover{
        color: #ffffff;
    }
    .lgt{
        background: rgb(231,66,60);
        border-radius: 8px;
        display: inline-block;
        float: right;
        height: 50px;
        line-height: 50px;
        margin: 15px 0 88px;
        text-align: center;
        width: 40%;
    }
    .right{
        float: right;
        margin-top: 10px;
    }
    .wrap .fa{
        width: 36px;
    }
    section a {
        color:#999
    }
    .modl_tel {
        background: #ffffff none repeat scroll 0 0;
        border-bottom: 1px solid #ccc;
        height: 60px;
        line-height: 60px;
        margin: 10px 0;
        padding-left: 10px;
    }
    .topban {
        padding: 0 10px;
    }
    .topban {
        background-color: #ffffff;
        overflow: hidden;
        position: relative;
        width: 100%;
    }
    .topban {
        background: #fff none repeat scroll 0 0;
        height: 140px;
        overflow: unset;
        position: relative;
        width: 100%;
    }
    .status-people-pic {
        left: 0;
        margin-left: 15px;
        margin-top: -50px;
        position: absolute;
        top: 50%;
    }
    .stat-people {
        background: #fafafa none repeat scroll 0 0;
        border-radius: 30em;
        display: block;
        padding: 7px;
        position: relative;
        width: 100px;
    }
    .topban {
        overflow: unset;
        position: relative;
        width: 100%;
    }
    .nav {
        background: rgb(249, 249, 249) none repeat scroll 0 0;
        border-top: 1px solid #ddd;
        bottom: 0;
        opacity: 0.9;
        padding: 6px 0 !important;
        position: fixed;
        width: 100%;
        height: 55px;
    }
    .nav .nav-box {
        color: #333;
        float: left;
        font-size: 14px;
        text-align: center;
        width: 50%;
        height: 100%;
    }
    .nav .nav-box.actt{
        color: #068043;
    }

    .topban {
        overflow: unset;
        padding: 20px;
        position: relative;
        width: 100%;
    }
    .lgt.ok {
        background: #068043 none repeat scroll 0 0;
        border-radius: 8px;
        display: inline-block;
        float: left;
        height: 50px;
        line-height: 50px;
        margin: 15px 0 88px;
        text-align: center;
        width: 40%;
    }
    #sign{
        color: #ffffff;
        font-size: 18px;
    }
    .wrap {
        padding: 0 20px;
        position: relative;
    }
    .jt {
        border: 1px solid #101010;
        font-size: 16px;
        height: 5rem;
        line-height: 5rem;
        margin: 20px auto 0;
        text-align: center;
        width: 10rem;
    }
    .child_box {
        margin-top: 30px;
        width: 100%;
    }
    .child_box .child_zw {
        border: 0 none;
        float: left;
        height: 6rem;
        margin: 0 0 20px;
        padding: 0 5px;
        width: 20%;
    }
    .child_box .child_zw .zw{
        width:50%;
        height: 3rem;
        border: 1px solid #111111;
        float:left;
    }
    .btn_footer {
        margin: 0 auto;
        padding: 0 30px;
    }
    .zw_name span {
        display: block;
        text-align: center;
        width: 100%;
    }
    .btn_footer a{
        color: #ffffff;
        font-size:18px
    }
    #container {
        width : 800px;
        height: 400px;
        margin: 8px auto;
    }
    #pjImage{
        width: 300px;
        height:300px ;
        margin: 8px auto;
    }
    #zjImage{
        width: 300px;
        height:300px ;
        margin: 8px auto;
    }
    .breadcrumb li a.act{
        color: red;
    }
    .zw_name span {
        display: block;
        font-size: 12px;
        text-align: center;
        width: 100%;
    }
    #box5 table img{
        width: 20px;
    }
    .child_box .child_zw .zw {
        border: 1px solid #111111;
        float: left;
        height: 3rem;
        width: 100%;
    }
    .child_box .child_zw {
        border: 0 none;
        float: left;
        height: 6rem;
        margin: 0 0 20px;
        padding: 0 5px;
        width: 16%;
    }
    #zz{
        position: absolute;
        top:120px;
        left: 0;
        width: 100%;
        z-index: 9999;
    }
    .breadcrumb li a{
        font-size: 16px;
    }
    .nav {
        z-index: 99999;
    }
</style>

<div class="data">
    <header class="homeHder header">






        <div class="hder_logo">课程观测</div>
        <div class="hder_urse flor"><a  id="logOut"  href="javascript:void(0);"><i class="fa fa-sign-out"></i></a></div>
        <script type="text/javascript">
            $(function(){
                $("#logOut").click(function(){
                    if(window.confirm('你确定要退出吗？')){
                        $.ajax({
                            type: "POST",
                            url: '<?php echo Yii::app()->createUrl('observation/logOut') ?>',
                            data: {
                                'openid':'<?php echo $openid ?>'
                            },
                            dataType: "json",
                            success: function (data) {
                                if (data) {
                                    if(data.status==1){
                                        window.location.reload();
                                    }else{
                                        alert(data.message);
                                        return false;
                                    }
                                }else{
                                    alert('操作失败');
                                    return false;
                                }
                            }
                        });
                    }
                });
            });
        </script>
    </header>
    <section class="wrap">
        <ol style="padding-left:0px" class="breadcrumb">
            <li><a class="Xbox act" id="Xpj" href="javascript:void(0);">评价</a></li>
            <li><a class="Xbox" id="Xjsq" href="javascript:void(0);">计时表</a></li>
            <li><a class="Xbox" id="Xhd" href="javascript:void(0);">互动</a></li>
            <li><a class="Xbox" id="Xzb" href="javascript:void(0);">指标</a></li>
            <?php if($type=='ls'){ ?>
            <li><a class="Xbox" id="Xpy" href="javascript:void(0);">评语</a></li>
            <?php } ?>
        </ol>

        <script type="text/javascript">
            $(function(){
                var _height = $("#box1").height();
                $("#zz").css({'height':_height});
                $("#Xpj").click(function(){
                    $(".Xbox").removeClass("act");
                    $(this).addClass("act");
                    $(".body_box").hide();
                    $("#box1").show();
                });
                $("#Xjsq").click(function(){
                    $(".Xbox").removeClass("act");
                    $(this).addClass("act");
                    $(".body_box").hide();
                    $("#box3").show();
                });
                $("#Xhd").click(function(){
                    $(".Xbox").removeClass("act");
                    $(this).addClass("act");
                    $(".body_box").hide();
                    $("#box4").show();
                });
                $("#Xzb").click(function(){
                    $(".Xbox").removeClass("act");
                    $(this).addClass("act");
                    $(".body_box").hide();
                    $("#box5").show();
                });
                $("#Xpy").click(function(){
                    $(".Xbox").removeClass("act");
                    $(this).addClass("act");
                    $(".body_box").hide();
                    $("#box6").show();
                })

            });
        </script>


        <div  class="body_box" id="box1">
            <div id="zz"></div>
            <h5>本次课堂观测得分 ：<b style="color: darkred;"><?php echo intval($thisOpen); ?></b>分</h5>
            <h5>历史课堂观测平均得分 ：<b style="color: darkred;"><?php if($lishi['point']){ ?><?php echo intval($lishi['point']/$lishi['count']); ?><?php }else{ ?>-<?php } ?></b>分 <?php if($type=='ls' && $lishi['point']){ ?><a id="ckls" href="javascript:void(0);">查看统计</a><?php } ?></h5>

            <h3>教师评分</h3>

            <div id="pjImage"></div>

            <h3>专家评分</h3>

            <div id="zjImage"></div>

            <div style="margin-bottom: 60px; margin-top: 20px;" class="alert alert-success" role="alert">柱状图统计每个评价项得分。不同颜色区分该项总分和对应得分值。</div>






        </div>
        <div  class="body_box" id="box2" style="display: none">





        </div>
        <div class="body_box"  id="box10" style="display: none">
            <?php if(intval($thisOpen)==0){ ?>
                <h5>本次课堂观测得分 ：<b style="color: darkred;">-</b>分</h5>
            <?php }else{ ?>
                <h5>本次课堂观测得分 ：<b style="color: darkred;"><?php echo intval($thisOpen); ?></b>分</h5>
            <?php } ?>
            <h5>历史课堂观测平均得分 ：<b style="color: darkred;"><?php if($lishi['point']){ ?><?php echo intval($lishi['point']/$lishi['count']); ?><?php }else{ ?>-<?php } ?></b>分</h5>
            <canvas id="canvas" height="250" width="300"></canvas>

            <div style="margin-bottom: 60px; margin-top: 20px;" class="alert alert-success" role="alert">备注：曲线图统计该教师历史课程得分情况</div>

        </div>
        <div class="body_box" id="box3" style="display: none">
            <h5>回答时间总时长 ：<b style="color: darkred;"><?php echo $this->timeRunning($huida_time['count']) ?></b> </h5>
            <h5>活动时间总时长 ：<b style="color: darkred;"><?php echo $this->timeRunning($huodong_time['count']) ?></b></h5>
            <div style="margin-bottom: 20px; margin-top: 20px;" class="alert alert-success" role="alert">备注：红色为上课时间，绿色为答题时间，黄色为活动时间</div>
            <canvas id="chart-area" width="250" height="300"></canvas>

            <div style="width: 100%;height: 60px;"></div>
        </div>
        <div class="body_box" id="box4" style="display: none">
            <h5>课堂回答互动总次数 ：<b style="color: darkred;"><?php echo intval($orderCount['count']); ?></b>次 </h5>
            <div class="jt">讲台</div>
            <div style="margin-bottom:60px" class="child_box" >
                <?php
                for ($x=1; $x<=7; $x++) {
                    for ($y=1; $y<=6; $y++) {
                        ?>
                        <?php
                        $strleft = 'left'.$x.$y;
                        $$strleft = OpenOrder::model()->find('oid=:oid and x=:x and y=:y and type=:type',array(':oid'=>$open_info->id,':x'=>$x,':y'=>$y,':type'=>'left'));
                        ?>
                        <div  class="child_zw">
                            <?php if(intval($$strleft->num) >=5){ ?>
                                <div style="background-color: red;" class="zwleft zw"></div>
                            <?php }else{ ?>
                                <div class="zwleft zw"></div>
                            <?php } ?>

                            <div class="zw_name">
                                <?php if($$strleft){ ?>
                                    <?php if($$strleft->user_name){ ?>
                                        <span class="zw_name_left"><?php echo $$strleft->user_name ?> (<b><?php echo intval($$strleft->num); ?></b>)</span>
                                    <?php }else{ ?>
                                        <span class="zw_name_left"><?php echo $x.'排'.$y.'列' ?> (<b><?php echo intval($$strleft->num); ?></b>)</span>
                                    <?php } ?>
                                <?php }else{ ?>
                                    <span class="zw_name_left"><?php echo $x.'排'.$y.'列' ?>(<b>0</b>)</span>
                                <?php } ?>

                            </div>
                        </div>
                        <?php
                    }
                }
                ?>
                <div class="clearfix"></div>
            </div>










        </div>
        <div class="body_box" id="box5" style="display: none">
            <h3>评价指标</h3>
            <?php foreach($openPoint as $v){ ?>
                <div class="alert alert-info" role="alert"><?php echo $v->title ?></div>
                <?php $point_info = OpenPoint::model()->findAll('pid=:pid',array(':pid'=>$v->id)); ?>
                <table class="table table-striped">
                    <tbody>
                    <?php if($point_info){ ?>
                        <?php foreach($point_info as $vv){ ?>
                            <tr>
                                <th style="width:180px;"><?php echo $vv->title ?></th>
                                <td><div id="star<?php echo $vv->id; ?>"></div></td>
                            </tr>
                        <?php } ?>
                    <?php } ?>

                    </tbody>
                </table>
            <?php } ?>
            <div style="width: 100%;height: 60px;"></div>
        </div>
        <div class="body_box" id="box6" style="display: none">


                <table class="table table-striped">
                    <tbody>
                    <?php if($comment){ ?>
                        <?php foreach($comment as $cv){ ?>
                            <tr>

                                <td><?php if($cv['type']==1){ echo '听课老师：'; }else{ echo '专家：'; } ?><?php //echo $cv['user_name'] ?> &nbsp;&nbsp;<?php echo date('Y-m-d H:i',$cv['create_time']) ?></td>
                            </tr>
                            <tr>
                                <td><?php echo $cv['text'] ?></td>
                            </tr>
                        <?php } ?>
                    <?php } ?>

                    </tbody>
                </table>

        </div>



            <script type="text/javascript">
                <?php if($startInfo){ ?>
                <?php if($allChildPoint){ ?>
                <?php foreach($allChildPoint as $vvv){ ?>
                <?php $lll = $vvv->id ?>
                $('#star<?php echo $vvv->id ?>').raty({
                    readOnly: true,
                    size:24,
                    score: <?php echo $startInfo[$lll]; ?>,
                    starHalf    : '<?php echo $this->staticsPath."/start/img/star-half.png" ?>',
                    starOff     : '<?php echo $this->staticsPath."/start/img/star-off.png" ?>'     ,
                    starOn      : '<?php echo $this->staticsPath."/start/img/star-on.png" ?>',



                });
                <?php } ?>
                <?php } ?>
                <?php }else{ ?>
                <?php if($allChildPoint){ ?>
                <?php foreach($allChildPoint as $vvv){ ?>
                <?php $lll = $vvv->id ?>
                $('#star<?php echo $vvv->id ?>').raty({
                    readOnly: true,
                    size:24,
                    score: 0,
                    starHalf    : '<?php echo $this->staticsPath."/start/img/star-half.png" ?>',
                    starOff     : '<?php echo $this->staticsPath."/start/img/star-off.png" ?>'     ,
                    starOn      : '<?php echo $this->staticsPath."/start/img/star-on.png" ?>',
                });
                <?php } ?>
                <?php } ?>
                <?php } ?>




                window.onload = function() {
                    <?php if($lishiData){ ?>
                    var ctx = document.getElementById("canvas").getContext("2d");
                    ctx.fillRect(10, 10, 20, 20);
                    window.myLine = new Chart(ctx).Line(lineChartData);
                    <?php } ?>
                    var ctx1 = document.getElementById("chart-area").getContext("2d");
                    ctx1.fillRect(10, 10, 20, 20);
                    window.myPie = new Chart(ctx1).Pie(pieData1);
                };

                <?php if($lishiData){ ?>
                var lineChartData = {
                    labels : [
                        <?php foreach($lishiData as $lv){ ?>
                        "<?php echo date('m月d日',$lv['end_time']) ?>",
                        <?php } ?>


                    ],
                    datasets : [
                        {

                            label: "My Second dataset",

                            fillColor : "rgba(151,187,205,0.2)",

                            strokeColor : "rgba(151,187,205,1)",

                            pointColor : "rgba(151,187,205,1)",

                            pointStrokeColor : "#fff",

                            pointHighlightFill : "#fff",

                            pointHighlightStroke : "rgba(151,187,205,1)",

                            data : [
                                <?php foreach($lishiData as $lv){ ?>
                                <?php echo intval($lv['point']) ?>,
                                <?php } ?>

                            ]

                        }

                    ]



                };

                <?php } ?>

                var pieData1 = [
                    <?php
                        $ztime = $open_info->open_time ? $open_info->open_time*1000*60 : 40*60*1000;
                        $time1= $ztime - $huida_time['count'] - $huodong_time['count'];
                        $time2= intval($huida_time['count']);
                        $time3= intval($huodong_time['count']);
                    ?>
                    {

                        value: <?php echo $time1 ?>,

                        color:"#F7464A",

                        highlight: "#FF5A5E",

                        label: "上课时间"

                    },

                    {

                        value: <?php echo $time2 ?>,

                        color: "#46BFBD",

                        highlight: "#5AD3D1",

                        label: "答题时间"

                    },

                    {
                        value: <?php echo $time3 ?>,

                        color: "#FDB45C",

                        highlight: "#FFC870",

                        label: "活动时间"

                    },





                ];


















                $(function(){
                    $("#ckls").click(function(){
                        $("#box1").hide();
                        $("#box10").show();
                    });
                    $("#bcls").click(function(){
                        $("#box10").hide();

                        $("#box1").show();
                    });
                });


                (function bars_stacked(container, horizontal) {
                    var
                        d1 = [],
                        d3 = [],
                        graph, i;

                    <?php foreach($arr as $kk=>$vv){ ?>
                    d1.push([<?php echo $kk ?>, <?php echo $vv['sj']; ?>]);
                    d3.push([<?php echo $kk ?>, <?php echo $vv['sy']; ?>]);
                    <?php } ?>



                    graph = Flotr.draw(container,[
                        { data : d1, label : '实际得分' },

                        { data : d3, label : '总分' }
                    ], {
                        xaxis: {
                            noTicks: 3,
                            tickFormatter: function (x) {
                                var x = parseInt(x),
                                    months = [
                                        <?php foreach($openPoint as $k=>$v){ ?>
                                        '<?php echo $v->title; ?>',
                                        <?php } ?>
                                    ];
                                return months[(x)%<?php echo count($openPoint)+1; ?>];
                            }
                        },
                        legend : {
                            backgroundColor : '#D2E8FF' // Light blue
                        },
                        bars : {
                            show : true,
                            stacked : true,
                            horizontal : horizontal,
                            barWidth : 0.6,
                            lineWidth : 1,
                            shadowSize : 0
                        },
                        grid : {
                            verticalLines : horizontal,
                            horizontalLines : !horizontal
                        }
                    });
                })(document.getElementById("pjImage"));


                (function bars_stacked(container, horizontal) {
                    var
                        d1 = [],
                        d3 = [],
                        graph, i;

                    <?php foreach($arr1 as $kkk=>$vvv){ ?>
                    d1.push([<?php echo $kkk ?>, <?php echo $vvv['sj']; ?>]);
                    d3.push([<?php echo $kkk ?>, <?php echo $vvv['sy']; ?>]);
                    <?php } ?>



                    graph = Flotr.draw(container,[
                        { data : d1, label : '实际得分' },

                        { data : d3, label : '总分' }
                    ], {
                        xaxis: {
                            noTicks: 3,
                            tickFormatter: function (x) {
                                var x = parseInt(x),
                                    months = [
                                        <?php foreach($openPoint as $k=>$v){ ?>
                                        '<?php echo $v->title; ?>',
                                        <?php } ?>
                                    ];
                                return months[(x)%<?php echo count($openPoint)+1; ?>];
                            }
                        },
                        legend : {
                            backgroundColor : '#D2E8FF' // Light blue
                        },
                        bars : {
                            show : true,
                            stacked : true,
                            horizontal : horizontal,
                            barWidth : 0.6,
                            lineWidth : 1,
                            shadowSize : 0
                        },
                        grid : {
                            verticalLines : horizontal,
                            horizontalLines : !horizontal
                        }
                    });
                })(document.getElementById("zjImage"));

            </script>




























    </section>
    <?php if($type=='ls'){ ?>
    <nav class="nav">
        <a href="<?php echo $this->createUrl('show',array('id'=>$open_info->id,'type'=>$type,'openid'=>$openid)) ?>" class="">
            <div class="nav-box">
                <i class="fa fa-book"></i>座位表
            </div>
        </a>
        <a href="javascript:void(0);" id="pj" class="">
            <div class="nav-box actt">
                <i class="fa fa-home"></i>评价
            </div>
        </a>
    </nav>
    <?php } ?>
</div>

<div class="modal fade" id="Xalert" data-id="1" tabindex="-1" role="dialog" aria-labelledby="linkModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <!-- 登陆页面注册提示 -->
        <div class="modal-content text-left">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">提示</h4>
            </div>
            <div class="modal-body">
                <p id="alertMassage"></p>
                <button type="button" style="margin-top: 20px" class="btn btn-primary" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function Xalert(html){
        $("#alertMassage").html(html);
        $("#Xalert").modal();
        setTimeout(function(){$("#Xalert").modal('hide')},2000);
    }

</script>
